<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core"
	template="/layout/dialogLayout.xhtml">  
	<ui:param name="param_pageTitle" value="#{messages.crud_btn_add}" />
    <ui:param name="param_panelWidth" value="500px"/>	
    <ui:param name="id" value="add" />
	<ui:define name="content">
		<h:form>
			<rg:titlePanel type="writable" needButton="true" headerTitle="新增员工">
				<rg:fieldSet>
				<rg:inputText id="userName"  required="true"  label="姓名" value="#{partyAction.party.userName}" />
				<rg:inputText id="alias"  required="true"  label="别名" value="#{partyAction.party.alias}" />
				<rg:inputText id="loginName" required="true" label="编号" value="#{partyAction.party.appUser.username}" tip="登录帐号"/>
				<rg:inputPassword id="password" required="true" label="登录密码" value="#{partyAction.party.appUser.password}" />
				<rg:inputPassword id="passwordAgain" required="true" label="确认密码" value="#{partyAction.criteria.appUser.password}" 
					validator="#{passwordCompareValidator}" />
				<rg:selectOne id="roles" required="true" label="用户角色" value="#{partyAction.party.appUser.roles}" 
					converter="#{roleConverter}" itemsProvider="#{roleProvider}"/>
				<rg:selectOne id="partyGroup" required="true" label="员工分组" value="#{partyAction.party.partyGroup}" 
					converter="#{partyGroupConverter}" itemsProvider="#{partyGroupProvider}"/>
				<rg:selectOne id="gender"  required="true"  label="姓别" value="#{partyAction.party.gender}" 
					converter="#{genderConverter}" itemsProvider="#{genderProvider}"/>
				<rg:inputText id="address"  label="地址" value="#{partyAction.party.address}" />
				<rg:inputText id="telephone" label="联系电话" value="#{partyAction.party.telephone}" />
				<rg:inputText id="mobile" label="移动电话" value="#{partyAction.party.mobile}" />
				<rg:inputText id="QQ"  label="QQ" value="#{partyAction.party.qq}" />
				<rg:inputText id="MSN"  label="MSN" value="#{partyAction.party.msn}" /> 
				<rg:inputText id="email"  label="E-MAIL" value="#{partyAction.party.email}" />
				</rg:fieldSet>
			
				<ui:define name="panelButton">
	                <a:commandButton styleClass="button"
	                    value="#{messages.btn_complete}" onclick="UI.instance.showMask()"
	                    oncomplete="UI.instance.reRender('reRenderPartyTable');"
	                    action="#{partyAction.addParty()}"
	                    reRender="#{id}Scripts,globalMessage" />
	                <input type="button" class="button" value="#{messages.btn_cancel}"
	                    onclick="javascript:DialogLayout.instance.close();" />
	            </ui:define>
			</rg:titlePanel>
		</h:form>
	</ui:define>
</ui:composition>